<%@page import="dier.xuanke"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

         <title>用户选择页面</title>

</head>
</head>
<style type="text/css">
   div {
    margin: 0 660px;
   }
   p {
    display: inline;
   }
   
   h2 {
    text-align: center;
    color: blue;
   }
   .xx{
    height: 1000px;
    width: 500;
    
   }
   
   .ys {
   Font-size:35px;
    color: red;
   }
 </style>
 
<body>
<div class="xx">
<%
String Name=null;
try
{Name=request.getParameter("tid");}
catch(Exception e){}
out.print(Name);
				String olTeID=request.getParameter("olTeID");
				String TeID=request.getParameter("TeID");
				String Tname=request.getParameter("Tname");
				String Zhicheng=request.getParameter("Zhicheng");
				String Tclass=request.getParameter("Tclass");
				xuanke xk=new xuanke();
				int temp=xk.checkTe(TeID, Tclass);
				if(temp==0)
				{
					%>
					<script type="text/javascript" >
     				alert("错误:录入失败，工号和学院不匹配。");         //弹出提示框输出错误信息
     				window.location='Teaxiugai.jsp' ;     //跳转到登录界面
					</script>
					<%
				}
				else
				{
					int flag=xk.Teaxiugai(olTeID, TeID, Tname, Zhicheng, Tclass);
					if(flag==0)
					{
						%>
						<script type="text/javascript" >
	     				alert("错误:录入失败。");         //弹出提示框输出错误信息
	     				window.location='Teaxiugai.jsp' ;     //跳转到登录界面
						</script>
						<%
					}
					else
					{%>
						<script type="text/javascript" >
	     				alert("修改成功。");  
	     				</script>
						<a href="Teacher.jsp"><button class="btn" name="tid" value=<%= Name%>>返回主菜单</button></a>
						<%
					}
				}
				
%>
</div>
</body>
</html>